import { useAccess, useModel } from '@umijs/max';
import { Col, Row, Space } from 'antd';
import React from 'react';
import TableHotRank from './TableHotRank';

interface TabHotProps {
  hotRankTypes: any[];
}

const TabHot: React.FC<TabHotProps> = ({ hotRankTypes }) => {
  const access = useAccess();

  const { initialState } = useModel('@@initialState');
  const { currentUser } = initialState || {};

  return (
    <Row gutter={[16, 16]}>
      <Col span={12}>
        <Space direction={'vertical'}>
          {hotRankTypes.map((item, index) => {
            return (
              <TableHotRank
                hotIcon={item.icon}
                hotName={`${item.name} - 全国`}
                hotType={item.type}
                hotCity={0}
                onRefurbish={function (): void {}}
              />
            );
          })}
        </Space>
      </Col>
      <Col span={12}>
        <Space direction={'vertical'}>
          {hotRankTypes.map((item, index) => {
            return (
              <TableHotRank
                hotIcon={item.icon}
                hotName={`${item.name} - 重庆`}
                hotType={item.type}
                hotCity={1}
                onRefurbish={function (): void {}}
              />
            );
          })}
        </Space>
      </Col>
    </Row>
  );
};
export default TabHot;
